package com.lwy.demo.dao;

import com.lwy.demo.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface UserMapper {

    int insertUser(User user);

    @Select("select * from t_user where id = #{id}")
    User selectUser(Integer id);

    @Delete("delete from t_user where id = #{id}")
    int deleteUser(Integer id);

    int updateUser(User user);
}
